<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>编辑课室</title>
	<%@include file="../common/header.jsp"%>

<style type="text/css">
	h1 {
		text-align: center;
		margin-top: 200px;
	}
	
	h1 a {
		color:red;
	}
	
	input {
		text-align: center;
	}
</style>
</head>
<body>
		<div id="header">
			<img class="logo_img" alt="" src="../../static/img/logo.png" >
			<span class="wel_word">编辑课室</span>
			<%@include file="../common/manager_menu.jsp"%>
		</div>
		
		<div id="main">
			<form action="manager/classroomServlet">
				<input type="hidden" name="action" value="${empty param.id ? "add" : "update"}">
				<input type="hidden" name="id" value="${requestScope.classroom.id}">
				<input type="hidden" name="pageNo" value="${param.pageNo}">
				<table>
					<tr>
						<td>课室名称</td>
						<td>容量</td>
						<td>多媒体情况</td>
						<td>类型</td>
						<td>状态</td>
						<td colspan="2">操作</td>
					</tr>

					<tr>
						<td><input name="name" type="text" value="${requestScope.classroom.name}"/></td>
						<td><input name="capacity" type="text" value="${requestScope.classroom.capacity}"/></td>
						<c:if test="${empty param.id}">
						<td><input name="medium" type="text" value=""/></td>
						<td><input name="type" type="text" value=""/></td>
						<td><input name="status" type="text" value=""/></td>
						<td><input type="submit" value="提交"/></td>
						</c:if>
						<c:if test="${!empty param.id}">
							<td><input name="medium" type="text" value="${requestScope.classroom.medium==0?"无":"有"}"/></td>
							<td><input name="type" type="text" value="${requestScope.classroom.type==0?"普通教室":"阶梯教室"}"/></td>
							<td><input name="status" type="text" value="${requestScope.classroom.status==0?"空闲中":"已借出"}"/></td>
							<td><input type="submit" value="提交"/></td>
						</c:if>
					</tr>

				</table>
			</form>
			
	
		</div>

		<%@include file="../common/footer.jsp"%>

</body>
</html>